const site_oss = 'https://jlmkkj.oss-accelerate.aliyuncs.com'

const changeUploadImgUrlToOss = url=>{
	const reg = /(.*)(\/upload.+)/g
	return url.replace(reg,($,$1,$2)=>site_oss+$2);
}

// 一维数组转二位数组
const array2Two = (list,number)=> {
    const  pages = []
    list.forEach((item, index) => {
        const page = Math.floor(index / number)
        if (!pages[page]) {
          pages[page] = []
        }
        pages[page].push(item)
    });
  return pages
}

export {
	site_oss,
	changeUploadImgUrlToOss,
	array2Two
}